package cn.edu.shou.lab.leeson4;

public enum Admin {
    Tom("男", "123"),Cindy("女", "123");

    private String sex;
    private String password;



    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    Admin(String sex, String password) {
        this.sex = sex;
        this.password = password;
    }

    public static Admin getAdmin(String name){
        Admin a = null;
        try {
            a = Admin.valueOf(name);
        }catch (Exception e){
        }
        return a;
    }

}
